<template>
	<z-paging ref="paging" v-model="courseLists" @query="queryList" auto-height :emptyViewSuperStyle="{}" :pagingContentStyle="{'flex':courseLists.length>0?1:0,display:'flex',flexDirection:'column'}" :loading-full-fixed="true" :showEmpty="true">
		<template #top>
			<image src="https://www.mingxinshuke.com/vip/static/png/riskBener1-7c9cb303.png" mode="widthFix" style="width: 100%;display: block;"></image>
			<u-search style="flex: 0;" wrapBgColor="#FFF" bgColor="#F6F6F6" placeholder="请输入关键词" actionText="查询" v-model="keyword" :hideRight="true"  @search="searchFun" @custom="searchFun" @clear="searchFun"></u-search>
		</template>
		<view v-for="(val,key) in courseLists" class="bg-white u-border-radius-10 u-p-20 u-m-t-20 u-m-l-20 u-m-r-20">
			<view class="u-p-t-20 u-flex">
				<view style="width: 80px;">姓名:</view>
				<view>{{val.id_card_name||'-'}}</view>
			</view>
			<view class="u-p-t-20 u-flex">
				<view style="width: 80px;">手机号:</view>
				<view>{{val.mobile||'-'}}</view>
			</view>
			<view class="u-p-t-20 u-p-b-20 u-flex">
				<view style="width: 80px;">检测时间:</view>
				<view>{{val.create_time||'-'}}</view>
			</view>
			
			<u-button type="primary" :custom-style="{
				width:'100%',
				margin: '0 auto',
				borderRadius:'10rpx',
				background: '#437EEA'
			}" @click="selectInfo(val)">主贷人风险报告</u-button>
		</view>
		<view slot="loading">
			<xy-loading></xy-loading>
		</view>
	</z-paging>
</template>

<script>
	import {
		queryListsDatas,
		info
	} from '../../api/enterprise_report'
	export default {
		data() {
			return {
				keyword:'',
				courseLists: [],
			};
		},
		methods:{
			searchFun(){
				this.$refs.paging.reload()
			},
			async queryList(pageNo, pageSize) {
				let { data } = await queryListsDatas({
					keyword:this.keyword,
					page_no: pageNo,
					page_size:pageSize
				});
				this.$refs.paging.complete(data.list);
			},
			selectInfo(e){
				window.location.href = e.file
			}
		}
		
	}
</script>

<style lang="scss">

</style>
